﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace RIO.Utilits
{
  public static class GlobalHotKey
  {
    [DllImport("User32.dll")]
    public static extern bool RegisterHotKey(IntPtr hWnd, int id, uint fsModifiers, uint vk);

    [DllImport("User32.dll")]
    public static extern bool UnregisterHotKey(IntPtr hWnd, int id);

    [DllImport("kernel32.dll")]
    public static extern Int16 GlobalAddAtom(string name);

    [DllImport("kernel32.dll")]
    public static extern Int16 GlobalDeleteAtom(Int16 nAtom);

    public const int WM_HOTKEY = 0x0312;
    public const int MOD_CONTROL = 0x0002;
  }
}
